var http = require("http");

// console.log(http);
var server = http.createServer(function(req,res){
    // console.log("服务器被访问");
    // console.log(res);
    res.writeHead(200,{
    "Content-Type":"text/html;charset=utf8" 
    });
    console.log("服务器被访问，",req.url);
    res.write("hello node-中文");
    res.write("<h1>hello node</h1>");
    res.end();
    
});

// console.log(server);

server.listen(3000,function(){
    console.log("服务器启动成功");
});

